package com.yuxuan.controller;

import com.yuxuan.service.RpcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpMethod;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * 对外发布的恐吓类
 */
@RestController
public class RpcController {

    @Autowired
    private RpcService rpcService;

    @RequestMapping(value = "rpc",method = RequestMethod.GET)
    public void rpcInvoke(){
        System.out.println(rpcService.sayRpc("rpc servicecomb "));
    }

    @RequestMapping(value = "upper",method = RequestMethod.GET)
    public String strToUpper(String str){
        return rpcService.strToUpper(str);
    }

}
